package maven.jyhs.com.entity;

import lombok.*;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Menu implements Serializable {


    @Override
    public String toString() {
        return "Menu{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", icon='" + icon + '\'' +
                ", href='" + href + '\'' +
                ", target='" + target + '\'' +
                ", pid=" + pid +
                ", child=" + child +
                '}';
    }

    private Integer id;
    @NotEmpty(message="用户编码不能为空")
    private String title;
    @Length(min=6,max=10,message="用户密码长度为6-10")
    private String icon;

    private String href;

    private String target;


    private  Integer pid;





    @Setter
    @Getter
    private List<Menu> child;

}
